function array_flip(trans){var key,tmp_ar={};for(key in trans){tmp_ar[trans[key]]=key;}return tmp_ar;}